-- GENERATED SPELL FOR [Corrupted Air Elemental] --


function spell0_21707(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21707', 3000, 1)
end

function spell1_21707(pUnit, Event) --@Shadowform,Self--
pUnit:FullCastSpellOnTarget(35194,pUnit)
pUnit:RegisterEvent('Sorts_21707', 620, 1)
end

function Sorts_21707(pUnit, Event)
local choix_sorts_21707 = math.random(0, 1)
if choix_sorts_21707 == 0 then
pUnit:RegisterEvent('spell0_21707', 1, 1)
end
if choix_sorts_21707 == 1 then
pUnit:RegisterEvent('spell1_21707', 1, 1)
end
end

function mob21707_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21707', math.random(1500, 3000), 1)
end

function mob21707_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21707_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21707_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21707, 1, 'mob21707_Action')
RegisterUnitEvent(21707, 2, 'mob21707_Leave')
RegisterUnitEvent(21707, 3, 'mob21707_Kill')
RegisterUnitEvent(21707, 4, 'mob21707_Die')
